package com.dao.purchase;

import com.model.purchase.PurchaseSupplyDealMm;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface SupplyDealMmMapper {

	/**
	 * 新增
	 * 
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int insert(PurchaseSupplyDealMm purchaseSupplyDealMm);

	/**
	 * 刪除
	 * 
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int delete(@Param("resId") String resId, @Param("infId") String infId, @Param("planId") String planId);

	int deleteByResId(String resId);

	/**
	 * 更新
	 * 
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int update(PurchaseSupplyDealMm purchaseSupplyDealMm);

	/**
	 * 查询 根据主键 id 查询
	 * 
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	PurchaseSupplyDealMm load(int id);

	/**
	 * 查询 分页查询
	 * 
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	List<PurchaseSupplyDealMm> pageList(int offset, int pagesize);

	/**
	 * 查询 分页查询 count
	 * 
	 * @author chenjun
	 * @date 2022/02/25
	 **/
	int pageListCount(int offset, int pagesize);

	/**
	 * 查询 根据主键 id 查询
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	PurchaseSupplyDealMm load(@Param("infId") String infId, @Param("resId") String resId,
			@Param("mmCode") String mmCode);

	PurchaseSupplyDealMm loadByInfCodeAndRes(@Param("infId") String infCode, @Param("resId") String resId,
			@Param("mmCode") String mmCode);

	PurchaseSupplyDealMm loadByPlanId(@Param("infId") String infId, @Param("resId") String resId,
			@Param("planId") String planId);

	List<PurchaseSupplyDealMm> loadByInfIdAndResId(@Param("resId") String resId, @Param("infId") String infId);

	List<PurchaseSupplyDealMm> loadByResId(@Param("resId") String resId);

	// 列表
	List<PurchaseSupplyDealMm> selectList(Map<String, Object> map);

	// 列表总数
	int selectListCount(Map<String, Object> map);
}
